package com.netdisk.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 文件实体类
 */
@Data
@TableName("files")
@ApiModel(value = "文件实体", description = "文件信息")
public class File {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "文件ID")
    private Integer id;

    @ApiModelProperty(value = "文件名")
    private String name;

    @ApiModelProperty(value = "文件大小(字节)")
    private Long size;

    @ApiModelProperty(value = "文件类型")
    private String type;

    @ApiModelProperty(value = "存储路径")
    private String path;

    @ApiModelProperty(value = "用户ID")
    private Integer userId;

    @ApiModelProperty(value = "是否收藏")
    private Boolean isFavorite;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    @ApiModelProperty(value = "删除时间")
    // Comment out TableLogic temporarily to test if it's causing issues
    // @TableLogic(value = "null", delval = "now()")
    private LocalDateTime deletedAt;
} 